package uk.co.drpj.rep;

public class Timings {
	
	public static PulseSequence fourBeat;
	public static PulseSequence one;
	
	static {
		fourBeat=new PulseSequence(4);
		for (int i=0;i<4;i++) {
			fourBeat.setPulse(i,i,0.9);
		}	
		
		one=new PulseSequence(1);
		one.setPulse(0,0,3.9);
	}

	/**
	 * Make a pulse into a poly pulse
	 * 
	 * @param proto
	 * @param poly
	 * @return
	 */
	public static PulseSequence makePoly(PulseSequence proto, int poly) {
		PulseSequence ret=new PulseSequence(poly*proto.pulses.length);
		Pulse pulses[]=proto.getPulses();

		for (int i=0;i<proto.pulses.length;i++){
			for(int p=0;p<poly;p++){
				ret.setPulse(i*poly+p, pulses[i]);
			}
		}
		return ret;
	}

}
